<?php 

namespace App\Http\Presenters;

use Laracasts\Presenter\Presenter;


class SmsPresenter extends Presenter
{
  
    public function templateStatus()
    {
        $value = '';
        switch ($this->status)
        {
            case 0: 
                $value = '<span class="grey">审核中</span>'; 
                break;
            case 1: 
                $value = '<span class="green">审核通过</span>'; 
                break;
            case 2: 
                $value = '<span class="red">审核失败</span>'; 
                break;
            default: 
                break;
        }
        return $value;       
    }

    
    public function templateType()
    {
        $value = '';
        switch ($this->type)
        {
            case 0: 
                $value = '验证码'; 
                break;
            case 1: 
                $value = '短信通知'; 
                break;
            case 2: 
                $value = '推广短信'; 
                break;
            case 3: 
                $value = '国际/港澳台消息'; 
                break;
            default: 
                break;
        }
        return $value;       
    }


    public function batchType()
    {
        $value = '';
        switch ($this->is_batch)
        {
            case 0: 
                $value = '<span class="grey">不可群发</span>'; 
                break;
            case 1: 
                $value = '<b>可群发</b>'; 
                break;
            default: 
                break;
        }
        return $value;       
    }
}
